<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>正岗管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnImport").click(function(){
				$.jBox($("#importBox").html(), {title:"导入数据", buttons:{"关闭":true}, 
					bottomText:"导入文件不能超过5M，仅允许导入“xls”或“xlsx”格式文件！"});
			});
			
			$("#btnExport").click(function(){
				top.$.jBox.confirm("确认要导出考勤数据吗？","系统提示",function(v,h,f){
					if(v=="ok"){
						$("#searchForm").attr("action","${ctx}/us/usAttendanceAdp/export2");
						$("#searchForm").submit();
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").attr("action","${ctx}/us/usAttendanceAdp/list");
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<div id="importBox" class="hide">
		<form id="importForm" action="${ctx}/us/usAttendanceAdp/import" method="post" enctype="multipart/form-data"
			class="form-search" style="padding-left:20px;text-align:center;" onsubmit="loading('正在导入，请稍等...');"><br/>
			<input id="uploadFile" name="file" type="file" style="width:330px"/><br/><br/>
			<input id="btnImportSubmit" class="btn btn-primary" type="submit" value="   导    入   "/>
			<!-- <a href="${ctx}/sys/user/import/template">下载模板</a> -->
			
		</form>
	</div>
	
	<ul class="nav nav-tabs">
	    <!-- 
		<li class="active">正岗列表</li>
		<shiro:hasPermission name="us:usAttendanceAdp:edit"><li><a href="${ctx}/us/usAttendanceAdp/form">正岗添加</a></li></shiro:hasPermission>
	     -->
	</ul>
	<form:form id="searchForm" modelAttribute="usAttendanceAdp" action="${ctx}/us/usAttendanceAdp/list" method="post" class="breadcrumb form-search">
	
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>companyCode：</label>
				<form:input path="companyCode" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>employeeId：</label>
				<form:input path="employeeId" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>lastName：</label>
				<form:input path="lastName" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<!-- 
			<li><label>payrollId：</label>
				<form:input path="payrollId" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			 -->
			<li>
				<label>日期范围：&nbsp;</label><input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
					value="<fmt:formatDate value="${usAttendanceAdp.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
				&nbsp;--&nbsp;<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
					value="<fmt:formatDate value="${usAttendanceAdp.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>&nbsp;&nbsp;
			</li>
			
			<li class="btns">
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>
			<input id="btnImport" class="btn btn-primary" type="button" value="导入"/>
			<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>
			</li>
			<li class="clearfix"></li>
			
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>company_code</th>
				<th>employee_id</th>
				<th>last_name</th>
				<th>payroll_id</th>
				<th>supervisor</th>
				<th>pay_cycles</th>
				<th>out_type</th>
				<th>worked_department</th>
				<th>state</th>
				<th>in_time</th>
				<th>out_time</th>
				<th>out_punch_type</th>
				<th>hours</th>
				<th>earnings_code</th>
				<th>notes</th>
				<!--  
				<shiro:hasPermission name="us:usAttendanceAdp:edit"><th>操作</th></shiro:hasPermission>
				-->
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="usAttendanceAdp">
			<tr>
				<td>
					${usAttendanceAdp.companyCode}
				</td>
				<td>
					${usAttendanceAdp.employeeId}
				</td>
				<td>
					${usAttendanceAdp.lastName}
				</td>
				<td>
					${usAttendanceAdp.payrollId}
				</td>
				<td>
					${usAttendanceAdp.supervisor}
				</td>
				<td>
					${usAttendanceAdp.payCycles}
				</td>
				<td>
					${usAttendanceAdp.outType}
				</td>
				<td>
					${usAttendanceAdp.workedDepartment}
				</td>
				<td>
					${usAttendanceAdp.state}
				</td>
				<td>
				<fmt:formatDate value="${usAttendanceAdp.inTime}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
				<fmt:formatDate value="${usAttendanceAdp.outTime}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					${usAttendanceAdp.outPunchType}
				</td>
				<td>
					${usAttendanceAdp.hours}
				</td>
				<td>
					${usAttendanceAdp.earningsCode}
				</td>
				<td>
					${usAttendanceAdp.notes}
				</td>
				<!-- 
				<shiro:hasPermission name="us:usAttendanceAdp:edit"><td>
    				<a href="${ctx}/us/usAttendanceAdp/form?id=${usAttendanceAdp.id}">修改</a>
					<a href="${ctx}/us/usAttendanceAdp/delete?id=${usAttendanceAdp.id}" onclick="return confirmx('确认要删除该美东美西正岗吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
				 -->
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>